CentOS 6
Sponsored Link

Nagios : Notification Settings
2015/02/23
 
This is the Notification Settings section.
It is enabled on some items by default but if you change it, configure like follows.
[1]
[2] Set notification recipients. And aldo Nagios sends notifications with mail command, so install it.
[root@dlp ~]#
yum -y install mailx
[root@dlp ~]#
vi /etc/nagios/objects/contacts.cfg
# line 35: set recipient email address

email
root@localhost
[root@dlp ~]#
/etc/rc.d/init.d/nagios restart

Running configuration check...done.
Stopping nagios: done.
Starting nagios: done.
[3] It's possible to change notification setting on Nagios admin site.
Login to it and click "Services", then services list is displayed. The icons which are displayed near a service name are just the one which notification is disabled. (HTTP and SSH corresponds to the example below) To enable notification on a service, click service name first.

     

[4] Click "Enable notifications for this service".

 

[5] Click "Commit" button.

 

[6] It's OK to set the notification.
[7] If notification is enabled and a service has some troubles, the notification like follows are sent to the recipients you set.
Subject: ** PROBLEM Service Alert: localhost/SSH is CRITICAL **
User-Agent: Heirloom mailx 12.4 7/29/08
Content-Type: text/plain; charset=us-ascii
From: nagios@dlp.srv.world

***** Nagios *****

Notification Type: PROBLEM

Service: SSH
Host: localhost
Address: 127.0.0.1
State: CRITICAL

Date/Time: Wed Feb 25 03:29:48 JST 2015

Additional Info:

Connection refused
 
Tweet